package wisp.gui;

//GTGE GUI
import com.golden.gamedev.gui.*;
import com.golden.gamedev.gui.toolkit.*;

//WISP
import wisp.game.PlayerSprite;

public class SkillBar extends TPane{

	private PlayerSprite owner;
	public TButton btn1;
	public TButton btn2;
	public TButton btn3;
	
	public SkillBar(PlayerSprite p){
		super(250, 5, 300, 100);

		owner = p;
		
		//skill bar should change depending on the skills of the user.
		btn1 = new TButton("Skill1", 5, 5, 70, 50) {
			public void doAction() {
				button1();
			}
		};
		btn1.setToolTipText("Skill 1");
		
		btn2 = new TButton("Skill2", 75, 5, 70, 50) {
			public void doAction() {
				button2();
			}
		};
		btn2.setToolTipText("Skill 2");
		
		btn3 = new TButton("Skill3", 145, 5, 70, 50) {
			public void doAction() {
				button3();
			}
		};
		btn3.setToolTipText("Skill 3");
		
		this.add(btn1);
		this.add(btn2);
		this.add(btn3);
	}
	
	public void button1(){
		System.out.println("Skil button 1 pressed");
		owner.setSkillKeyUsed(1);
		
	}
	
	public void button2(){
		System.out.println("Skil button 2 pressed");
		owner.setSkillKeyUsed(2);
	}
	
	public void button3(){
		System.out.println("Skil button 3 pressed");
		owner.setSkillKeyUsed(3);
	}

}
